<?php
session_start();
if(!isset($_SESSION['isAdmin']) || $_SESSION['isAdmin'] == ''){
    $a['code'] = -1;
    $a['msg'] = '请以管理员身份登录以后访问本页面';
    echo json_encode($a);
    exit;
}
include_once 'conn.php';
$carID = $_POST['carID'];
$sql = "update carinfo set ok = 0 where id = $carID";
$result = mysqli_query($conn,$sql);
if($result){
    $a['code'] = 200;
}
else{
    $a['code'] = -1;
    $a['msg'] = '删除失败';
}
echo json_encode($a);